1. Field of the Invention
The present invention relates to a communication system using packet switching and, more particularly, to a communication system which enables efficient switching of communication between a server and a client and a switching method thereof.
2. Description of the Related Art
In an OSI reference model network protocol, data communication network functions are classified roughly into seven layers which are, from the lowest-order, a physical layer, a data link layer, a network layer, a transport layer, a session layer, a presentation layer and an application layer. They are in some cases referred to as a layer 1, a layer 2 and so on in order.
Among nodes on a communication network, some are called a layer 2 switch, a layer 3 switch, and a layer 4 switch corresponding to layers of data to be referred to in communication switching. In recent years, there are provided a layer 7 switch (or a 4-7 layer switch) for minutely controlling flow and traffic based on information of a higher-order application layer.
FIG. 18 is a block diagram showing a structure of a conventional communication system having a switching apparatus 100b which is a layer 7 switch.
In the conventional communication system shown in FIG. 18, a server group 71 including a plurality of servers 70 and clients 60 are connected to each other by a network 50 as a packet switching network. Among packet switching networks is an IP (Internet Protocol) network.
Each client 60 is supplied with service from the servers 70 in the server group 71 through the network 50. In the service, first, the client 60 sets up a connection of a transport layer (e.g. TCP protocol) enabling bidirectional communication with the server 70 and the client 60 sends to the server 70 an identifier of data to be obtained, so that the designated data is sent from the server 70 to the client 60. With one connection, a plurality of data acquisition requests can be issued and in this case, the server 70 will sequentially send the requested data to the client 60.
When finishing obtaining the data to be obtained from a certain server 70, the client 60 sends a close request to the server 70 to instruct the server side to cut off the connection.
In the connection of the transport layer for bidirectional communication which is used in this service, a packet includes a sequence number indicative of a position of data in the transport layer contained in the packet, a data length of data of the packet at the transport layer and an Ack number for indicating, to a communication partner, a data position at the transport layer whose reception is surely finished so far. Transport layer protocol terminating units (terminating units) at the opposite ends of communication conduct retransmission control of a packet lost in the course of communication by using the sequence number and the Ack number.
The packet in some cases includes a field (window field) for indicating a remaining capacity of a reception buffer to a communication partner for the purpose of flow control at the opposite ends of communication. The value of this field will be referred to as a Win value hereinafter.
In addition, at the opposite ends of communication, an initial value of a sequence number is notified to each other by hand shaking. Moreover, at the end of a connection, the connection is cut off by sending and receiving a packet having a flag (end flag) indicative of the end of connection set-up and a packet including an acknowledgement of the reception to and from each other. One example of such protocol is the TCP protocol for use in the Internet.
Next, function and operation of the conventional switching apparatus 100b shown in FIG. 18 will be described in more detail.
The switching apparatus 100b of FIG. 18 has a function of making the client 60 virtually recognize the plurality of servers 70 in the server group 71 as one server to transfer a data acquisition request from the client 60 to an appropriate server 70 and transfer data of an acknowledgement from the server 70 to the client 60 in question.
By the client 60, the server group 71 is recognized as a virtual one server 70 (virtual server) having the same network 50 address. When the client 60 intends to connect with a virtual server having the address in question, first a connection is set up between the client 60 and the switching apparatus 100b. 
The client 60 puts a data acquisition request (identifier of data to be obtained) onto the connection. The switching apparatus 100b selects the server 70 as an appropriate connection destination based on the identifier of the data acquisition request transferred through the connection.
Next, the switching apparatus 100b sets up a connection to the selected server 70 to transfer the data acquisition request onto the connection. The server 70 makes data whose acquisition is requested flow on the connection and the switching apparatus 100b transfers the data to the client 60.
At this time point, there are two connections, one between the client 60 and the switching apparatus 100b and the other between the switching apparatus 100b and the server 70 and the switching apparatus 100b links the connections together.
In other words, connecting the two transport layer connections between the client 60 and the switching apparatus 100b and between the switching apparatus 100b and the server 70 into one to cause the server 70 and the client 60 to conduct retransmission and flow control of the transport layers eliminates the need of the switching apparatus 100b for conducting retransmission and flow control regarding the connection in question.
This operation will be referred to as splicing.
In the following, detailed description will be made of processing of splicing by the switching apparatus 100b as a conventional layer 7 switch with reference to the attached drawings. FIG. 19 is a block diagram showing a structure of the conventional switching apparatus 100b. 
The switching apparatus 100b of FIG. 19 includes a client side processing unit 10b for processing communication with the client side, a server side processing unit 20b for processing communication with the server side, an analysis unit 30b for determining a connection destination of each client and a storage unit 40b for recording a forwarding table indicative of a server as a connection destination corresponding to an individual data acquisition request from the client or the like.
The client side processing unit 10b includes a client side terminating unit 11b for terminating communication on the client side, a client side switching unit 13b for switching a data communication path and a client side communication unit 14b for transmitting and receiving packets to and from each client. The server side processing unit 20b includes a server side terminating unit 21b for terminating communication on the server side, a server side updating unit 22b for rewriting header information of a packet to update the same, a server side switching unit 23b for switching a data communication path and a server side communication unit 24b for transmitting and receiving packets to and from each server 70.
A packet from the client 60 to the switching apparatus 100b arrives at the client side switching unit 13b from the direction indicated by an arrow A in FIG. 19, while a packet from the switching apparatus 100b to the client 60 is delivered from the client side terminating unit 11b or the server side updating unit 22b to the client 60 following arrows B and C in FIG. 19.
On the other hand, a packet from the server side to the switching apparatus 100b arrives at the switching unit 23b from the direction indicated by an arrow E in FIG. 19, while a packet from the switching apparatus 100b to the server 70 is delivered from the server side terminating unit 21b or the server side updating unit 22b to the server 70 following an arrow D etc. in FIG. 19.
The client side switching unit 13b hands the packet arriving from the direction indicated by the arrow A over to the client side terminating unit 11b or the server side updating unit 22b by an instruction by the server side updating unit 22b. The server side switching unit 23b hands the packet arriving from the direction of the arrow E over to the server side updating unit 22b or the server side terminating unit 21b according to an instruction by the server side terminating unit 21b. 
First, when the client 60 intends to connect to a virtual server, hand shaking is conducted for the establishment of a connection. A packet at this time is transmitted and received between the client 60 and the client side terminating unit 11b by an instruction to the client side switching unit 13b given by the server side updating unit 22b, thereby setting up a connection between the client 60 and the client side terminating unit 11b. Hereinafter, an initial sequence number of the client 60 and an initial sequence number of the client side processing unit 10b at this time of connection will be referred to as “SC” and “SU”, respectively, and recorded.
The client 60 hands the data acquisition request (identifier of data to be obtained) over onto the connection. The client side terminating unit 11b processes the transport layer protocol to take out data flowing on the connection and hands the data acquisition request over to the analysis unit 30b. 
The analysis unit 30b is capable of selecting an appropriate server 70, for example, by referring to the forwarding table stored in the storage unit 40b based on the data acquisition request or by other method. Then, the analysis unit 30b instructs the server side terminating unit 21b to set up a connection with the selected server 70, so that the server side terminating unit 21b sets up the connection with the designated server 70.
At this time, hand shaking is conducted for setting up a connection between the server side terminating unit 21b and the server 70. Here, the server side terminating unit 21b instructs the server side switching unit 23b about a proper communication path such that the server side terminating unit 21b and the server 70 can communicate a packet related to hand shaking. An initial sequence number of the server 70 and an initial sequence number of the server side terminating unit 21b at this time of connection will be referred to as “SS” and “SV”, respectively, and recorded.
Next, the analysis unit 30b hands the data acquisition request over to the server side terminating unit 21b to transfer the data acquisition request to the server 70 by using the established connection. Here, the server side terminating unit 21b instructs the switching unit 23b to conduct switching such that a packet sent hereafter from the server 70 in question is handed over to the server side updating unit 22b. 
Next, a packet mounted with data corresponding to the data acquisition request arrives at the switching apparatus 100b from the server 70. The packet sent from the server 70 is handed over to the server side updating unit 22b by the switching unit 23b. 
The server side updating unit 22b updates header information at the time of relay of this packet. More specifically, the unit rewrites the sequence number and the Ack number of the packet, and if necessary correctly updates a check sum of the transport layer protocol, and sends the updated data to the client 60.
Updating of a sequence number and an Ack number of a packet sent hereafter from the server 70 will be conducted by rewriting data of the packet so as to be equivalent to data of a packet transmitted from the client side processing unit 10 (i.e. the switching apparatus 100b).
In a case, for example, where no other packets than that described above is transmitted from the client 60, the packet can be updated as follows.
First, as to a sequence number, add a difference between an initial sequence number “SU” of the client side terminating unit 11b which is received from the client side terminating unit 11b and an initial sequence number “SS” of the server 70 which is received from the server side terminating unit 21b. In other words, “updated sequence number=current sequence number+SU−SS”. At this time, processing to be conducted when the updated sequence number exceeds a maximum value of a sequence number will be conformed to addition and subtraction methods of sequence numbers in the transport layer protocol.
As to an Ack number, add a difference between an initial sequence number “SC” of the client 60 which is received from the client side terminating unit 11b and an initial sequence number “SV” of the server side terminating unit 21 which is received from the server side terminating unit 21b. In other words, “updated Ack number=current Ack number+SC−SV”.
With this arrangement, the transport layer protocol of the client 60 is allowed to process a packet from the server 70 regarding the packet as a packet from the client side processing unit 10b (i.e. from the switching apparatus 100b).
In the same manner, packets sent hereafter from the client 60 to the server 70 are handed over by the client side switching unit 13b to the server side updating unit 22b where a sequence number and an Ack number of a packet in question will be rewritten to have values equivalent to those of a packet sent from the server side processing unit 20b (i.e. the switching apparatus 100b), and the rewritten packet is sent. In other words, the packet will be rewritten to have “updated sequence number=current sequence number+SV−SC” and “updated Ack number=current Ack number+SS−SU”.
Data transmission and reception between the server 70 and the client 60 hereafter can be thus realized only by the processing of rewriting a sequence number of each packet without processing at the client side terminating unit 11b and the server side terminating unit 21b which terminate the transport layer protocol.
The foregoing is connection splicing as described above.
In general, while only a small volume of data such as a data acquisition request flows from the client 60 to the server 70, a large volume of data flows from the server 70 to the client 60. In a case, for example, where accessing a web server is made by a web browser of a client, a large volume of data such as image data will be transmitted from the server 70 to the client 60.
Execution of this connection splicing enables relay of a large volume of data without complicated transport layer termination processing (retransmission and flow control etc.), thereby improving throughput.
The above-described conventional switching apparatus 100b, however, has a problem that at splicing, the switching apparatus 100b is not allowed to refer to a data acquisition request sent from the client 60.
Moreover, since the conventional switching apparatus 100b determines the server 70 corresponding to a data acquisition request sent from the client 60 to splice connections based only on the first sent request, the apparatus can not transfer a data acquisition request arriving from the client 60 after the connection splicing to an appropriate server 70 based on the request.
In addition, when data transfer from the selected server 70 to the client 60 based on the first sent data acquisition request is finished, even if other data acquisition request to the same server 70 remains, the above-described close request is sent to the server 70 to cut off the connection.
Since the connection is cut off, as to an acquisition request that the server 70 fails to process, the client 60 needs to start over with set-up of a connection (hand shaking) to again obtain the request, which results in increasing a delay in obtaining necessary data.